<?php

namespace app\api\validate\user;

use app\api\validate\Validates;

class UserManager extends Validates
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
	    'bcid|书籍内容标识' => 'require|number|>:0',
        'audio_url|音频地址' => 'require|url',
        'score|分数' => 'require|float|>=:0|<=:100'
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [];

    /**
     * 场景验证
     * @var []
     */
    protected $scene = [
        'set' => ['bcid','audio_url'],
        'score' => ['bcid', 'score']
    ];
}
